<script setup lang="ts">
import { useCounterStore } from './store/counter';

const store = useCounterStore()
</script>

<template>
  <h1>Vue全局状态管理</h1>
  <p>store: {{ store }}</p>
  <button @click="store.addCount(1)">数据+1</button>
  <button @click="store.addCount(10)">数据+10</button>
  <p>totalCount:{{store.totalCount }}</p>
</template>